from ronglian_sms_sdk import SmsSDK

accId = '8aaf07087bc82708017bf7c5c12f0e6b'
accToken = 'c64b47a3514b49de9643a51da0f493a5'
appId = '8aaf07087bc82708017bf7c5c2120e72'

def send_message(mobile, code, time):
    import json
    sdk = SmsSDK(accId, accToken, appId)
    tid = '1'
    datas = (code, time)
    resp = sdk.sendMessage(tid, mobile, datas)
    result = json.loads(resp)
    if result['statusCode'] == '000000':
        return 1
    return 2